#include "VaisseauE.h"
#include <stdlib.h>
#include <string.h>

void initEnnemi1N(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image =(char *)malloc(sizeof(char)*10);
    strcpy(V->image, "Q");
    V->x= x;
    V->y=y;
    V->vie = 4;

}

void initEnnemi1(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="V";
    V->id = 'V';
    V->x= x;
    V->y=y;
    V->vie = 4;
}

void initEnnemi2(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="I";
    V->id ='I';
    V->x= x;
    V->y= y;
    V->vie = 1;
}

void initEnnemi3(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="N";
    V->id ='N';
    V->x= ter->dimx/2-2;
    V->y= y;
    V->vie = 50;
}

void initEnnemi5(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="A";
    V->id ='A';
    V->x= x;
    V->y= y;
    V->vie = 3;
}

void initBoss1(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="M";
    V->id ='M';
    V->x= ter->dimx/2-9;
    V->y= y;
    V->vie = 1;
}

void initBoss2(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="K";
    V->id ='K';
    V->x= x;
    V->y= y;
    V->vie = 500;
}

//représente un mur
void initEnnemi4(VaisseauEnnemi *V, Terrain *ter, int x, int y)
{
    V->image ="#";
    V->id ='#';
    V->x= ter->dimx/2-2;
    V->y= y;
    V->vie = 99999999;
}

void mortEnnemi(VaisseauEnnemi *V)
{
    if(V->vie<=0)
    {
        V->image="";
        V->id=-1;
        V->x=-1;
        V->y=-1;
    }
}
